﻿#region Using Directives

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Xml.Linq;

    using Csla;

    using MarketPulse.BusinessLogic.Core;

#endregion

namespace MarketPulse.BusinessLogic.Private
{
    /// <summary>
    /// This class represents a collection of branch attributes that are associated with a branch.
    /// </summary>
    [Serializable]
    [Csla.Server.ObjectFactory("MarketPulse.DataAccess.Factory.BranchFactory, MarketPulse.DataAccess.Factory", "FetchBranchAttributeList")]
    public class BranchAttributeList : MarketPulseListBase<BranchAttributeList, BranchAttribute>
    {

        #region Constructors

            /// <summary>
            /// Default constructor is private in order to (try to) enforce construction
            /// only via the static factory methods provided.
            /// </summary>
            private BranchAttributeList()
            {
            }

        #endregion

        #region Methods

            #region Factory Methods

                /// <summary>
                /// Method used to create a new collection of BranchAttributeList objects via the DataPortal client proxy
                /// </summary>
                /// <returns>The newly created collection of visits</returns>
                internal static BranchAttributeList New()
                {
                    return DataPortal.CreateChild<BranchAttributeList>();
                }
                
                /// <summary>
                /// Method used to get a list of branch attributes that are associated with a specific Branch
                /// </summary>
                /// <param name="branchGUID">The Guid of the Branch to retrieve the branch attribute list for</param>
                /// <returns>The populated Branch Attribute List collection</returns>
                internal static BranchAttributeList Get(Guid branchGUID)
                {
                    return DataPortal.Fetch<BranchAttributeList>(new SingleCriteria<Guid>(branchGUID));
                }

            #endregion

        #endregion

    }
}
